package com.example.bilibili;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@SpringBootApplication
@MapperScan("com.example.bilibili.mapper")

public class BilibiliApplication implements WebMvcConfigurer {

    public static void main(String[] args) {

        SpringApplication.run(BilibiliApplication.class, args);
    }

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry){
        /*
            addResoureHandler：指的是对外暴露的访问路径
            addResourceLocations：指的是内部文件放置的目录
        */
        registry.addResourceHandler("/imctemp-rainy/**").addResourceLocations("file:D:/testvideo");
    }
}
